Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
Aligns the Python observability SDK public API with the other language SDKs by consolidating request/span configuration, renaming invocation configuration types, and removing execution-type / tenant-details concepts from the public surface.
Changes:
- Introduces
Request+SpanDetailsas the primary way to pass conversation/session metadata and span configuration (parent context, timing, kind). - Replaces
InvokeAgentDetailswithInvokeAgentScopeDetailsand updates all scopestart(...)signatures accordingly. - Adds
UserDetails+ updatesCallerDetailscomposition model; removesExecutionType/GEN_AI_EXECUTION_TYPE_KEYusage across hosting + extensions + tests + docs.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/usage_example.py | Updates example usage to new Request/InvokeAgentScopeDetails API and removes execution type + tenant usage. |
| tests/observability/hosting/scope_helpers/test_scope_helper_utils.py | Removes execution-type pair helper/test to match removed attribute. |
| tests/observability/hosting/scope_helpers/test_populate_invoke_agent_scope.py | Updates scope construction + removes execution-type assertions. |
| tests/observability/hosting/middleware/test_output_logging_middleware.py | Updates middleware expectations (tenant optional; parent passed via SpanDetails). |
| tests/observability/extensions/openai/integration/test_openai_trace_processor.py | Aligns baggage builder API (user_*, agentic_user_*) and removes execution type expectation. |
| tests/observability/core/test_trace_context_propagation.py | Migrates scope creation to Request + SpanDetails; removes tenant details usage. |
| tests/observability/core/test_record_attributes.py | Removes tenant details from OpenTelemetryScope construction. |
| tests/observability/core/test_output_scope_bounded.py | Updates AgentDetails fields to agentic_user_* and removes tenant mock. |
| tests/observability/core/test_output_scope.py | Updates OutputScope.start(...) usage to new signature and parent via SpanDetails. |
| tests/observability/core/test_invoke_agent_scope.py | Updates to InvokeAgentScopeDetails, Request, SpanDetails, UserDetails composition. |
| tests/observability/core/test_inference_scope.py | Updates InferenceScope.start(...) signature and removes execution type / tenant usage. |
| tests/observability/core/test_execute_tool_scope.py | Updates ExecuteToolScope.start(...) signature and parent/span kind via SpanDetails. |
| tests/observability/core/test_custom_start_end_time.py | Moves custom timing into SpanDetails and updates ExecuteToolScope.start(...) signature. |
| tests/observability/core/test_baggage_builder.py | Renames baggage builder methods to user_* and agentic_user_*. |
| libraries/microsoft-agents-a365-observability-hosting/.../scope_helpers/utils.py | Removes execution type derivation helper and related constant imports. |
| libraries/microsoft-agents-a365-observability-hosting/.../populate_invoke_agent_scope.py | Stops recording execution type attribute during scope population. |
| libraries/microsoft-agents-a365-observability-hosting/.../populate_baggage.py | Stops populating execution type into baggage. |
| libraries/microsoft-agents-a365-observability-hosting/.../middleware/output_logging_middleware.py | Switches to Request + SpanDetails + UserDetails, removes tenant/execution-type tagging. |
| libraries/microsoft-agents-a365-observability-extensions-semantickernel/.../span_processor.py | Removes execution-type tagging for invoke-agent spans. |
| libraries/microsoft-agents-a365-observability-extensions-openai/.../trace_processor.py | Removes execution-type attribute tagging for agent spans. |
| libraries/microsoft-agents-a365-observability-extensions-langchain/.../utils.py | Removes set_execution_type() helper and execution-type constants usage. |
| libraries/microsoft-agents-a365-observability-extensions-langchain/.../tracer.py | Stops injecting execution-type attribute into spans. |
| libraries/microsoft-agents-a365-observability-core/.../trace_processor/util.py | Removes gen_ai.execution.type from exported attribute list. |
| libraries/microsoft-agents-a365-observability-core/.../spans_scopes/output_scope.py | Updates OutputScope API to accept Request/SpanDetails/UserDetails and records conversation + user attributes. |
| libraries/microsoft-agents-a365-observability-core/.../span_details.py | Adds SpanDetails dataclass for parent context, timing, and span kind. |
| libraries/microsoft-agents-a365-observability-core/.../request.py | Makes request content optional and adds conversation_id. |
| libraries/microsoft-agents-a365-observability-core/.../opentelemetry_scope.py | Removes tenant details support; aligns agentic user fields; factors cancel error type constant. |
| libraries/microsoft-agents-a365-observability-core/.../models/user_details.py | Introduces UserDetails model for human caller metadata. |
| libraries/microsoft-agents-a365-observability-core/.../models/caller_details.py | Redefines CallerDetails as composite of UserDetails and optional caller agent details. |
| libraries/microsoft-agents-a365-observability-core/.../middleware/baggage_builder.py | Renames fluent methods to agentic_user_* and user_*. |
| libraries/microsoft-agents-a365-observability-core/.../invoke_agent_scope.py | Aligns invocation scope signature + attribute recording with new models and SpanDetails. |
| libraries/microsoft-agents-a365-observability-core/.../invoke_agent_details.py | Renames to InvokeAgentScopeDetails and narrows to scope-level config. |
| libraries/microsoft-agents-a365-observability-core/.../inference_scope.py | Aligns inference scope signature + user/conversation attribute recording with new models. |
| libraries/microsoft-agents-a365-observability-core/.../execute_tool_scope.py | Aligns tool scope signature + user/conversation attribute recording with new models. |
| libraries/microsoft-agents-a365-observability-core/.../constants.py | Removes execution-type constant and adds cancellation error type constant. |
| libraries/microsoft-agents-a365-observability-core/.../agent_details.py | Renames agent identity fields to agentic_user_* and removes conversation_id. |
| libraries/microsoft-agents-a365-observability-core/.../init.py | Updates public exports to new classes and removes deprecated ones. |
| libraries/microsoft-agents-a365-observability-core/docs/design.md | Updates design doc for new API surface and data models. |
| docs/design.md | Updates repo-level design doc to new class names and usage patterns. |
Comments suppressed due to low confidence (1)
libraries/microsoft-agents-a365-observability-core/docs/design.md:1
- The fluent API names shown here don’t match the updated
BaggageBuilderimplementation (agentic_user_id(...)andagentic_user_email(...), notagent_auid(...)/agent_email(...)). Please update the table so the documented method names reflect the actual public API.
# Observability Core - Design Document
...365-observability-hosting/microsoft_agents_a365/observability/hosting/scope_helpers/utils.py
Show resolved
Hide resolved
...-hosting/microsoft_agents_a365/observability/hosting/middleware/output_logging_middleware.py
Show resolved
Hide resolved
...gents-a365-observability-core/microsoft_agents_a365/observability/core/invoke_agent_scope.py
Outdated
Show resolved
Hide resolved
...mantickernel/microsoft_agents_a365/observability/extensions/semantickernel/span_processor.py
Outdated
Show resolved
Hide resolved
|
The Python PR #209 does not fully align with the nodejs implementation. The key gaps are below. Please take a look TenantDetails still exists as a separate required parameter — Node.js absorbed it into AgentDetails.tenantId |
Can you please review the comments, I believe the diff was taken against the main branch and not the PR branch. |
...gents-a365-observability-core/microsoft_agents_a365/observability/core/invoke_agent_scope.py
Outdated
Show resolved
Hide resolved
|
Since this is breaking change, can you update changelog? |
done |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 44 out of 44 changed files in this pull request and generated 8 comments.
Comments suppressed due to low confidence (1)
libraries/microsoft-agents-a365-observability-hosting/microsoft_agents_a365/observability/hosting/scope_helpers/utils.py:27
AGENT_ROLEand_is_agentic()appear to be unused after removingget_execution_type_pair(). Consider removing them to avoid dead code and reduce confusion.
AGENT_ROLE = "agenticUser"
def _is_agentic(entity: Any) -> bool:
if not entity:
Task
Align public API across the 3 languages of observability SDK
Solution